//
// Created by Jisam on 2024年10月28日23:25:32
// Solution of  b
#include <bits/stdc++.h>

#define  int long long
#define  endl "\n"
#define  all(x) (x).begin(),(x).end()
#define  pb push_back
using namespace std;


signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    int t;
    cin >> t;
    while(t --){
        int n;
        cin >> n;
        vector<int> a(n + 2);
        for(int i = 0; i < n ; i ++)
        {
            cin >> a[i];
        }
        sort(all(a));
        int k = 1;
        for(int i = 0; i < n ; i += 2){
            k = max(k,abs(a[i] - a[i + 1]));
        }    
        int k2 = 1;
        for(int i = 1; i < n ; i += 2){
            k2 = max(k2,abs(a[i] - a[i + 1]));
        }    
        cout << min(k,k2) << endl;
    }
    return 0;
}